/**
 * Created by Administrator on 2016/11/8.
 */
(function(){
    /*
    * 取消收藏
    * */
    var my_collect={
        init:function(){
            this.wrap=$(".my_collect_wrap");
            this.delete();
        },
        delete:function(){
            this.wrap.on("click",".my_collect_del",function(){
                var collectid = $(this).data('collectid');
                var _this=$(this);
                $.post(get_userUrl()+'Ccollect/delete',{collectid:collectid},function(json){
                     layer.msg(json.errmsg, {icon:json.icon,time:1000}, function(){
                    	/* window.location.href = json.data;*/
                         _this.closest('li').remove();
                     });
                },'json');
            });
        }
    };
    my_collect.init();
})();